package com.cmwa.solution.business.investTrade.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cmwa.solution.base.entity.Page;
import com.cmwa.solution.base.entity.SearchParam;
import com.cmwa.solution.business.investTrade.dao.InvesSecurDao;
import com.cmwa.solution.business.investTrade.entity.InvesSecurVo;
import com.cmwa.solution.business.investTrade.service.InvesSecurService;

/**
 * 投资标的业务层实现
 * @author ex-chenbq
 *
 */
@Service
public class InvesSecurServiceImpl implements InvesSecurService{

	@Autowired
	private InvesSecurDao invesSecurDao;
	
	@Override
	public Page<InvesSecurVo> queryInvesSecurListPage(SearchParam param) {
		List<InvesSecurVo> items = invesSecurDao.queryInvesSecurListPage(param);
		return Page.create(items, param.getStart(), param.getLimit(), param.getTotal());
	}

	@Override
	public InvesSecurVo findInvesSecurById(String Id) {
		InvesSecurVo invesSecurVo = invesSecurDao.findInvesSecurById(Id);
		return invesSecurVo;
	}

	@Override
	public void insertInvesSecur(InvesSecurVo invesSecurVo) {
		invesSecurDao.insertInvesSecur(invesSecurVo);
	}

	@Override
	public void updateInvesSecur(InvesSecurVo invesSecurVo) {
		invesSecurDao.updateInvesSecur(invesSecurVo);
	}

	@Override
	public void deleteInvesSecurById(String id) {
		invesSecurDao.deleteInvesSecurById(id);
	}

}
